#include "Minus.hpp"

Minus::Minus ( Expression* op)
{
  _op=op;
}

Minus::~Minus ()
{
  delete _op;
}

void Minus::compute ()
{
  LOGFUNCTION ( IEXEC_LOG );
  _op->compute();
  getValue()=_op->getValue();
  setNumerical(getValue(),-getNumerical(getValue()));
}

void Minus::display ( const unsigned int shift) const
{
  std::cout << "-";
  _op->display();
}
